package info.xiaolong.exampleservice.service;

import info.xiaolong.exampleservice.model.document.EsTestDoc;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @Classname IEsTestService
 * @Description TODO
 * @Date 2022/4/27 13:43
 * @Created by Qinger
 */
public interface IEsTestService {
    Boolean createIndex(String index) throws IOException;

    Boolean deleteIndex(String index) throws IOException;

    Boolean save(EsTestDoc doc, String index) throws IOException;

    Boolean deleteDoc(String id, String index) throws IOException;

    Boolean saveAuto(EsTestDoc doc, String index) throws IOException;

    Boolean updateDoc(EsTestDoc doc, String index) throws IOException;

    Map<String,Object> getById(String index, String id) throws IOException;

    Object getById4Class(String index, String id) throws IOException;

    Boolean ifDocExists(String index, String id) throws IOException;

    Boolean batchSaveDoc(String index, List<EsTestDoc> list) throws IOException;
}
